/****** Object:  Stored Procedure [dbo].spPhieuNhapUpdate Script Date: 6/12/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spPhieuNhapUpdate]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spPhieuNhapUpdate]
GO

/******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**		14/06/2012	SongTM					Innit created
*******************************************************************************/

CREATE PROCEDURE [dbo].[spPhieuNhapUpdate]
(
	@SoPN nvarchar(14),
	@NgayNhapKho datetime,
	@NguoiNhap nvarchar(35),
	@NgayLapPhieu datetime,
	@NguoiLap nvarchar(35),
	@SoHD nvarchar(12),
	@LyDoNhap nvarchar(50),
	@GhiChu nvarchar(100),
	@MaNCC nvarchar(6),
	@MaKho nvarchar(5)
)

WITH ENCRYPTION

AS

SET NOCOUNT ON

UPDATE [tbl_PhieuNhap]
SET [NgayNhapKho] = @NgayNhapKho,
	[NguoiNhap] = @NguoiNhap,
	[NgayLapPhieu] = @NgayLapPhieu,
	[NguoiLap] = @NguoiLap,
	[SoHD] = @SoHD,
	[LyDoNhap] = @LyDoNhap,
	[GhiChu] = @GhiChu,
	[MaNCC] = @MaNCC,
	[MaKho] = @MaKho
WHERE	[SoPN] = @SoPN
GO

--GRANT EXECUTE ON [dbo].[spPhieuNhapUpdate] TO [sa]
--GO
